Crate iroh_net

source ·
Expand description

iroh-net provides connectivity for iroh.

This crate is a collection of tools to establish connectivity between peers. At the high level MagicEndpoint is used to establish a QUIC connection with authenticated peers, relaying and holepunching support.

The “derp-only” feature forces all traffic to send over the derp relays. We still receive traffic over udp and relay. This feature should only be used for testing.

Re-exports

Modules

  • Configuration types.
  • Default values used in iroh-net
  • Package derp implements the Designated Encrypted Relay for Packets (DERP) protocol written by Tailscale. DERP routes packets to clients using curve25519 keys as addresses. DERP is used by proxy encrypted QUIC packets through the DERP servers when a direct path cannot be found or opened. DERP is a last resort. Both side between very aggressive NATs, firewalls, no IPv6, etc? Well, DERP. Based on tailscale/derp/derp.go
  • Cryptographic key handling for iroh-net.
  • An endpoint that leverages a quinn::Endpoint backed by a magicsock::MagicSock.
  • Implements a socket that can change its communication path while in use, actively searching for the best way to communicate.
  • Co-locating all of the iroh-net metrics structs
  • Networking related utilities
  • Checks the network conditions from the current host.
  • Allows sending ICMP echo requests to a host in order to determine network latency.
  • Port mapping client and service.
  • STUN packets sending and receiving.
  • TLS configuration based on libp2p TLS specs.
  • Utilities used in iroh-net